package intro.databases.gtCarRental.ui.dialog;

import intro.databases.gtCarRental.GTCRActivity;
import intro.databases.gtCarRental.R;

import java.util.ArrayList;

import android.os.Bundle;
import android.widget.TextView;

public class CarAvailabilityDialog extends GTCRActivity {
	TextView carModel, carType, color, location, hourlyRate, dailyRate, 
			 seatingCapacity, transmissionType, btConn, auxCable, estCost;

	@Override
	public void onCreate(Bundle b) {
		super.onCreate(b);
		setContentView(R.layout.dialog_car_availability_details);

		ArrayList<String> carDetailValues = getIntent().getStringArrayListExtra("carDetailValues");
		
		carModel = (TextView) findViewById(R.id.textView_carAvailabilityDetails_carModel);
		carType = (TextView) findViewById(R.id.textView_carAvailabilityDetails_carType);
		color = (TextView) findViewById(R.id.textView_carAvailabilityDetails_color);
		location = (TextView) findViewById(R.id.textView_carAvailabilityDetails_location);
		hourlyRate = (TextView) findViewById(R.id.textView_carAvailabilityDetails_hourlyRate);
		dailyRate = (TextView) findViewById(R.id.textView_carAvailabilityDetails_dailyRate);
		seatingCapacity = (TextView) findViewById(R.id.textView_carAvailabilityDetails_seatingCapacity);
		transmissionType = (TextView) findViewById(R.id.textView_carAvailabilityDetails_transmissionType);
		btConn = (TextView) findViewById(R.id.textView_carAvailabilityDetails_bluetoothConnectivity);
		auxCable = (TextView) findViewById(R.id.textView_carAvailabilityDetails_auxillaryCable);
		estCost = (TextView) findViewById(R.id.textView_carAvailabilityDetails_estimatedCost);

		carModel.setText(carDetailValues.get(0));
		carType.setText(carDetailValues.get(1));
		location.setText(carDetailValues.get(2));
		color.setText(carDetailValues.get(3));
		hourlyRate.setText(carDetailValues.get(4));
		dailyRate.setText(carDetailValues.get(5));
		seatingCapacity.setText(carDetailValues.get(6));
		transmissionType.setText(carDetailValues.get(7));
		btConn.setText(carDetailValues.get(8));
		auxCable.setText(carDetailValues.get(9));
		estCost.setText(carDetailValues.get(10));
	}
}
